﻿<%@ Page Language="vb" AutoEventWireup="false" CodeFile="DeleteJobListing.aspx.vb" Inherits="DeleteJobListing" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>IT Professional Services - Delete Jobs</title>
    <script type="text/javascript" src="MainJS.js"></script>
</head>
<body onload="CheckAdminCookies('2');">
    <form id="form1" runat="server">
    <div>
    <asp:GridView ID="gvwJobUpdate" runat="server" AutoGenerateColumns="False" BorderColor="Black"
        BorderStyle="Solid" BorderWidth="1px" CellSpacing="2" DataKeyNames="jobId" DataSourceID="HotFootRecruitersDB">
        <RowStyle BackColor="#E0E0E0" BorderColor="Black" BorderStyle="Solid" BorderWidth="3px" />
        <EmptyDataRowStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
        <Columns>
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="jobSpecTitle" HeaderText="Title" SortExpression="jobSpecTitle" />
            <asp:BoundField DataField="jobCity" HeaderText="City" SortExpression="jobCity" />
            <asp:BoundField DataField="jobPayRate" HeaderText="Pay Rate" SortExpression="jobPayRate" />
            <asp:BoundField DataField="jobDescription" HeaderText="Description" SortExpression="jobDescription" />
        </Columns>
        <HeaderStyle BackColor="AntiqueWhite" BorderColor="Black" BorderStyle="Solid" BorderWidth="2px" />
        <EditRowStyle BackColor="#80FF80" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
        <AlternatingRowStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
    </asp:GridView>
    <asp:AccessDataSource ID="HotFootRecruitersDB" runat="server" DataFile="~/db/Jobs.mdb"
        DeleteCommand="DELETE FROM [tblJobs] WHERE [jobId] = ?" InsertCommand="INSERT INTO [tblJobs] ([jobSpecTitle], [jobCity], [jobPayRate], [jobDescription], [jobId]) VALUES (?, ?, ?, ?, ?)"
        SelectCommand="SELECT [jobSpecTitle], [jobCity], [jobPayRate], [jobDescription], [jobId] FROM [tblJobs] ORDER BY [jobSpecTitle]"
        UpdateCommand="UPDATE [tblJobs] SET [jobSpecTitle] = ?, [jobCity] = ?, [jobPayRate] = ?, [jobDescription] = ? WHERE [jobId] = ?">
        <DeleteParameters>
            <asp:Parameter Name="jobId" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="jobSpecTitle" Type="String" />
            <asp:Parameter Name="jobCity" Type="String" />
            <asp:Parameter Name="jobPayRate" Type="String" />
            <asp:Parameter Name="jobDescription" Type="String" />
            <asp:Parameter Name="jobId" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="jobSpecTitle" Type="String" />            
            <asp:Parameter Name="jobCity" Type="String" />
            <asp:Parameter Name="jobPayRate" Type="String" />
            <asp:Parameter Name="jobDescription" Type="String" />
            <asp:Parameter Name="jobId" Type="Int32" />
        </InsertParameters>
    </asp:AccessDataSource>    
    </div>
    </form>
    <br />
</body>
</html>
